[SPARK-46515] Add MONTHNAME function#44483
[SPARK-46515] Add MONTHNAME function#44483stefankandic wants to merge 10 commits intoapache:masterfrom
Conversation
d950437 to
8c6015a
Compare
fd86b1d to
dfe3182
Compare
|
Parity with what? Snowflake: Note that if we start with English, then for non English locale's this would turn into a breaking change when we extend to it. So we need to tread crefully to not create a trap for ourselves. |
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
Outdated
Show resolved
Hide resolved
|
+1, LGTM. Merging to master. |
| usage = "_FUNC_(date) - Returns the three-letter abbreviated month name from the given date.", | ||
| examples = """ | ||
| Examples: | ||
| > SELECT _FUNC_('2008-02-20'); |
There was a problem hiding this comment.
in the function doc, shall we avoid implicit cast and use DATE'2008-02-20'?
What changes were proposed in this pull request?
Added MONTHNAME function which returns three-letter abbreviated month name for a given date to:
Why are the changes needed?
for parity with Snowflake
Does this PR introduce any user-facing change?
Yes, new MONTHNAME function
How was this patch tested?
With newly added unit tests
Was this patch authored or co-authored using generative AI tooling?
No